package com.youhong.teethcare.settingpage;

import android.graphics.Color;
import android.os.Bundle;
import android.text.Html;
import android.text.Spanned;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.youhong.teethcare.BaseActivity;
import com.youhong.teethcare.R;
import com.youhong.teethcare.utils.ScreenUtils;

public class AboutUsDetailActivity extends BaseActivity {

    TextView tv_title, tv_content;
    ImageView iv_back;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_about_us_detail);
        initStatusBar(getResources().getColor(R.color.pageBackground),true);
        tv_title = findViewById(R.id.aboutUsDetail_title);
        tv_content = findViewById(R.id.aboutUsDetail_content);
        iv_back = findViewById(R.id.aboutUs_iv_back);
        iv_back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });

        int index = getIntent().getIntExtra("index", 1);

        switch (index) {
            case 1:
                tv_title.setText(R.string.about1_title);
                Spanned span = Html.fromHtml(getResources().getString(R.string.about1_content));
                tv_content.setText(span);
                break;
            case 2:
                tv_title.setText(R.string.about1_title);
                tv_content.setText(Html.fromHtml(getResources().getString(R.string.about2_content)));

                break;
            case 3:
                tv_title.setText(R.string.about1_title);
                tv_content.setText(Html.fromHtml(getResources().getString(R.string.about3_content)));

                break;
            case 4:
                tv_title.setText(R.string.about1_title);
                tv_content.setText(Html.fromHtml(getResources().getString(R.string.about4_content)));

                break;
            case 5:
                tv_title.setText(R.string.about1_title);
                tv_content.setText(Html.fromHtml(getResources().getString(R.string.about5_content)));

                break;
        }
    }
}
